#include<stdio.h>

int main(void) {
    char a[1000], *word, *p, *q;
    int length, max = 0, i;
    gets(a);
    p = a;
    while (*p != '\0') {
        word = p;
        while (*word != ' ' && *word != '\0') {
            word++;
        }
        length = word - p;
        if (length > max) {
            max = length;
            q = p;
        }
        p++;
    }
    printf("%d ", max);
    for (i = 0; i < max; i++) {
        printf("%c", q[i]);
    }
    return 0;
}
